using Circus.CodeEditor;
using System;
using System.ComponentModel;
namespace Circus.Syntax.CodeCompletion
{
	public class CodeSnippetImport : ICodeSnippetImport, IComparable
	{
		private string nspace = string.Empty;
		public virtual string Namespace
		{
			get
			{
				return this.nspace;
			}
			set
			{
				if (this.nspace != value)
				{
					this.nspace = value;
					this.OnNamespaceChanged();
				}
			}
		}

		protected virtual void OnNamespaceChanged()
		{
		}
		public virtual int CompareTo(object value)
		{
			if (value is ICodeSnippetImport)
			{
				return string.Compare(this.nspace, ((ICodeSnippetImport)value).Namespace, true);
			}
			throw new ArgumentException();
		}
	}
}
